/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.namabank.helpdesk.dbobj;

import java.io.Serializable;
import java.util.Date;
import org.hibernate.Session;
import org.hibernate.StatelessSession;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;

/**
 *
 * @author Nguyen Tran Hien
 */
@Entity
public class SMTB_DEPARTMENT implements Serializable {

    public SMTB_DEPARTMENT() {}

    public static SMTB_DEPARTMENT getById(String id, Session hsess){
        String qry = "from SMTB_DEPARTMENT where DEPT_ID = '" + id + "'";
        return (SMTB_DEPARTMENT)hsess.createQuery(qry).uniqueResult();
    }

    public static SMTB_DEPARTMENT getStatelesById(String id, StatelessSession hsess){
        String qry = "from SMTB_DEPARTMENT where DEPT_ID = '" + id + "'";
        return (SMTB_DEPARTMENT)hsess.createQuery(qry).uniqueResult();
    }

    private String DEPT_ID;
    private String DEPT_NAME;
    private String DEPT_HEAD_USER_ID;
    private String DEPT_PARENT_ID;
    private String PHONE_NO;
    private String FAX;
    private String DEPT_DESC;
    private Character RECORD_STAT;
    private String CREATED_BY;
    private Date CREATED_DATE;
    private String UPDATE_BY;
    private Date UPDATE_DATE;

    /**
     * @return the DEPT_ID
     */
    @Id
    public String getDEPT_ID() {
        return DEPT_ID;
    }

    /**
     * @param DEPT_ID the DEPT_ID to set
     */
    public void setDEPT_ID(String DEPT_ID) {
        this.DEPT_ID = DEPT_ID;
    }

    /**
     * @return the DEPT_NAME
     */
    public String getDEPT_NAME() {
        return DEPT_NAME;
    }

    /**
     * @param DEPT_NAME the DEPT_NAME to set
     */
    public void setDEPT_NAME(String DEPT_NAME) {
        this.DEPT_NAME = DEPT_NAME;
    }

    /**
     * @return the DEPT_HEAD_USER_ID
     */
    public String getDEPT_HEAD_USER_ID() {
        return DEPT_HEAD_USER_ID;
    }

    /**
     * @param DEPT_HEAD_USER_ID the DEPT_HEAD_USER_ID to set
     */
    public void setDEPT_HEAD_USER_ID(String DEPT_HEAD_USER_ID) {
        this.DEPT_HEAD_USER_ID = DEPT_HEAD_USER_ID;
    }

    /**
     * @return the DEPT_PARENT_ID
     */
    public String getDEPT_PARENT_ID() {
        return DEPT_PARENT_ID;
    }

    /**
     * @param DEPT_PARENT_ID the DEPT_PARENT_ID to set
     */
    public void setDEPT_PARENT_ID(String DEPT_PARENT_ID) {
        this.DEPT_PARENT_ID = DEPT_PARENT_ID;
    }

    /**
     * @return the PHONE_NO
     */
    public String getPHONE_NO() {
        return PHONE_NO;
    }

    /**
     * @param PHONE_NO the PHONE_NO to set
     */
    public void setPHONE_NO(String PHONE_NO) {
        this.PHONE_NO = PHONE_NO;
    }

    /**
     * @return the FAX
     */
    public String getFAX() {
        return FAX;
    }

    /**
     * @param FAX the FAX to set
     */
    public void setFAX(String FAX) {
        this.FAX = FAX;
    }

    /**
     * @return the DEPT_DESC
     */
    public String getDEPT_DESC() {
        return DEPT_DESC;
    }

    /**
     * @param DEPT_DESC the DEPT_DESC to set
     */
    public void setDEPT_DESC(String DEPT_DESC) {
        this.DEPT_DESC = DEPT_DESC;
    }

    /**
     * @return the RECORD_STAT
     */
    public Character getRECORD_STAT() {
        return RECORD_STAT;
    }

    /**
     * @param RECORD_STAT the RECORD_STAT to set
     */
    public void setRECORD_STAT(Character RECORD_STAT) {
        this.RECORD_STAT = RECORD_STAT;
    }

    /**
     * @return the CREATED_BY
     */
    public String getCREATED_BY() {
        return CREATED_BY;
    }

    /**
     * @param CREATED_BY the CREATED_BY to set
     */
    public void setCREATED_BY(String CREATED_BY) {
        this.CREATED_BY = CREATED_BY;
    }

    /**
     * @return the CREATED_DATE
     */
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    public Date getCREATED_DATE() {
        return CREATED_DATE;
    }

    /**
     * @param CREATED_DATE the CREATED_DATE to set
     */
    public void setCREATED_DATE(Date CREATED_DATE) {
        this.CREATED_DATE = CREATED_DATE;
    }

    /**
     * @return the UPDATE_BY
     */
    public String getUPDATE_BY() {
        return UPDATE_BY;
    }

    /**
     * @param UPDATE_BY the UPDATE_BY to set
     */
    public void setUPDATE_BY(String UPDATE_BY) {
        this.UPDATE_BY = UPDATE_BY;
    }

    /**
     * @return the UPDATE_DATE
     */
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    public Date getUPDATE_DATE() {
        return UPDATE_DATE;
    }

    /**
     * @param UPDATE_DATE the UPDATE_DATE to set
     */
    public void setUPDATE_DATE(Date UPDATE_DATE) {
        this.UPDATE_DATE = UPDATE_DATE;
    }
}
